package com.kmxd.ams.client.archive.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 特殊利用授权
 *
 * @author nickbi
 * @since 2022-07-27
 */
@Data
@ColumnWidth(15)
@HeadRowHeight(15)
@ContentRowHeight(15)
@HeadStyle
@HeadFontStyle(fontHeightInPoints = 12)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentFontStyle(fontHeightInPoints = 10)
@ExcelIgnoreUnannotated
@Schema(description = "特殊利用授权对象")
public class ArchiveAuthRuleListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "主键ID")
  private Long id;

  @Schema(description = "全宗ID")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "全宗ID")
  private Long fondsId;

  @Schema(description = "档案类型id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "档案类型id")
  private Long archTypeId;

  @Schema(description = "主表s_archive_auth表id")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "主表s_archive_auth表id")
  private Long authId;

  @Schema(description = "表名")
  @ExcelProperty(value = "表名")
  private String tableId;

  @Schema(description = "档案范围过滤条件的表达式")
  @ExcelProperty(value = "档案范围过滤条件的表达式")
  private String ruleExpress;

  @Schema(description = "档案范围过滤条件中文描述，用于回显前端")
  @ExcelProperty(value = "档案范围过滤条件中文描述，用于回显前端")
  private String ruleDesc;

  @Schema(description = "上级单位领导:0不允许, 1允许")
  @ExcelProperty(value = "上级单位领导:0不允许, 1允许")
  private Boolean parentOrgUseRole;

  @Schema(description = "本单位领导:0不允许, 1允许")
  @ExcelProperty(value = "本单位领导:0不允许, 1允许")
  private Boolean companyLevelUseRole;

  @Schema(description = "归档部门全体:0不允许, 1允许")
  @ExcelProperty(value = "归档部门全体:0不允许, 1允许")
  private Boolean filingDepartment;

  @Schema(description = "归档部门领导:0不允许, 1允许")
  @ExcelProperty(value = "归档部门领导:0不允许, 1允许")
  private Boolean filingDeptUseRole;

  @Schema(description = "经办部门全体:0不允许, 1允许")
  @ExcelProperty(value = "经办部门全体:0不允许, 1允许")
  private Boolean handlingDepartment;

  @Schema(description = "经办部门领导:0不允许, 1允许")
  @ExcelProperty(value = "经办部门领导:0不允许, 1允许")
  private Boolean handlingDeptUseRole;

  @Schema(description = "经办人:0不允许, 1允许")
  @ExcelProperty(value = "经办人:0不允许, 1允许")
  private Boolean handlingUser;

  @Schema(description = "归属单位:0不允许, 1允许")
  @ExcelProperty(value = "归属单位:0不允许, 1允许")
  private Boolean attributeOrg;

  @Schema(description = "其他特定人员,单位id串")
  @ExcelProperty(value = "其他特定人员,单位id串")
  private String orgIds;

  @Schema(description = "其他特定人员,部门id串")
  @ExcelProperty(value = "其他特定人员,部门id串")
  private String deptIds;

  @Schema(description = "其他特定人员,人员id串")
  @ExcelProperty(value = "其他特定人员,人员id串")
  private String userIds;

  @Schema(description = "其他特定人员,角色id串")
  @ExcelProperty(value = "其他特定人员,角色id串")
  private String roleIds;

  @Schema(description = "其他特定人员,用户组id串")
  @ExcelProperty(value = "其他特定人员,用户组id串")
  private String userGroupIds;

  @Schema(description = "适用人员范围: 1常用, 2其他")
  @ExcelProperty(value = "适用人员范围: 1常用, 2其他")
  private Integer userScope;

  @Schema(description = "在线浏览:0不允许, 1允许")
  @ExcelProperty(value = "在线浏览:0不允许, 1允许")
  private Boolean onlineBrowser;

  @Schema(description = "原文浏览，有权限为1，没有权限为0")
  @ExcelProperty(value = "原文浏览，有权限为1，没有权限为0")
  private Boolean browserFile;

  @Schema(description = "在线打印:0不允许, 1允许")
  @ExcelProperty(value = "在线打印:0不允许, 1允许")
  private Boolean onlinePrint;

  @Schema(description = "摘录:0不允许, 1允许")
  @ExcelProperty(value = "摘录:0不允许, 1允许")
  private Boolean excerpt;

  @Schema(description = "文件下载:0不允许, 1允许")
  @ExcelProperty(value = "文件下载:0不允许, 1允许")
  private Boolean download;

  @Schema(description = "原文下载(原格式):0不允许, 1允许")
  @ExcelProperty(value = "原文下载(原格式):0不允许, 1允许")
  private Boolean downloadSource;

  @Schema(description = "现场阅览:0不允许, 1允许")
  @ExcelProperty(value = "现场阅览:0不允许, 1允许")
  private Boolean liveRead;

  @Schema(description = "外借:0不允许, 1允许")
  @ExcelProperty(value = "外借:0不允许, 1允许")
  private Boolean lendOut;

  @Schema(description = "复制外发:0不允许, 1允许")
  @ExcelProperty(value = "复制外发:0不允许, 1允许")
  private Boolean copySend;

  @Schema(description = "状态`: 0未启用, 1启用")
  @ExcelProperty(value = "状态`: 0未启用, 1启用")
  private Boolean status;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "创建人")
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "创建时间")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty(value = "更新人")
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "更新时间")
  private Date updateTime;

  @Schema(description = "删除状态(0-正常,1-已删除)")
  @ExcelProperty(value = "删除状态(0-正常,1-已删除)")
  private Long delFlag;
}
